// ================alert 移除 折叠 全屏 开始====================
(function(n) {
    "use strict";

    function u(i) {
        return this.each(function() {
            var r = n(this),
                u = r.data("bs.alert");
            u || r.data("bs.alert", u = new t(this));
            "string" == typeof i && u[i].call(r)
        })
    }

    var i = '[data-dismiss="alert"]',
        t = function(t) {
            n(t).on("click", i, this.close)
        },
        r;
    t.VERSION = "3.3.1";
    t.TRANSITION_DURATION = 150;
    t.prototype.close = function(i) {
        function e() {
            r.detach().trigger("closed.bs.alert").remove()
        }

        var f = n(this),
            u = f.attr("data-target"),
            r;
        u || (u = f.attr("href"),
            u = u && u.replace(/.*(?=#[^\s]*$)/, ""));
        r = n(u);
        i && i.preventDefault();
        r.length || (r = f.closest(".alert"));
        r.trigger(i = n.Event("close.bs.alert"));
        i.isDefaultPrevented() || (r.removeClass("in"),
            n.support.transition && r.hasClass("fade") ? r.one("bsTransitionEnd", e).emulateTransitionEnd(t.TRANSITION_DURATION) : e())
    };
    r = n.fn.alert;
    n.fn.alert = u;
    n.fn.alert.Constructor = t;
    n.fn.alert.noConflict = function() {
        return n.fn.alert = r,
            this
    };
    n(document).on("click.bs.alert.data-api", i, t.prototype.close)
})(jQuery);
// ================alert 移除 折叠 全屏 结束====================

// ================== Widgets面板 开始=========================\
function InitiateWidgets() {

    $('.widget-header *[data-toggle="collapse"]').on("click", function(n) {
        n.preventDefault();
        var t = $(this).parents(".widget").eq(0),
            r = t.find(".widget-body"),
            i = $(this).find("i"),
            u = "fa-angle-double-down",
            f = "fa-angle-double-up",
            e = 300;
        t.hasClass("collapsed") ? (i && i.addClass(f).removeClass(u),
            t.removeClass("collapsed"),
            r.slideUp(0, function() {
                r.slideDown(e)
            })) : (i && i.addClass(u).removeClass(f),
            r.slideUp(200, function() {
                t.addClass("collapsed")
            }))
    });

}
InitiateWidgets();
// ================== Widgets面板 结束=========================